package com.dobby.pea.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dobby.pea.entity.tbGood;
import com.dobby.pea.entity.tbGoodSales;

import java.util.List;

/**
 * @author Dobby
 * @version 1.0
 */
public interface GoodSalesService extends IService<tbGoodSales> {
    /**
     * 返回该商品的销量
     * @return
     */
    tbGoodSales GoodBySales(Long goodId);

    /**
     * 对该商品的销量加一
     * @return
     */
    boolean SalesAddOne(tbGood tbgood);

    /**
     * 根据商品删除该商品的销量记录
     * @param tbGood
     */
    void SalesDelete(tbGood tbGood);


}
